// @ts-ignore
/* eslint-disable */
import { CreateItem, DeptResult } from '@/services/api/model/deptModel';
import { request } from '@umijs/max';
export async function getDeptList(data?: API.AreasParams, options?: { [key: string]: any }) {
  return request<DeptResult>(AUTH_URL + '/dept/list', {
    method: 'POST',
    data,
    ...(options || {}),
  });
}
export async function createItem(data: CreateItem) {
  return request(AUTH_URL + '/dept/create', {
    method: 'POST',
    data,
  });
}
export async function updateItem(data: CreateItem) {
  return request(AUTH_URL + '/dept/update', {
    method: 'PUT',
    data,
  });
}
export async function deleteItem(id: number) {
  return request(AUTH_URL + '/dept/delete?deptIds=' + id, {
    method: 'DELETE',
  });
}

export async function getItemDetails(
  params: { includeAsset?: boolean; token: string },
  options?: { [key: string]: any },
) {
  return request<CreateItem>(AUTH_URL + '/superlink/api/assets/' + params.token, {
    method: 'GET',
    params,
    ...(options || {}),
  });
}
